//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.bfsuol.bfsuolcomponents.file.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bfsuol.bfsuolcomponents.file.dao.FileManagerMapper;
import com.bfsuol.bfsuolcomponents.file.dao.FileManager;
import com.bfsuol.bfsuolcomponents.file.service.FileManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.io.FileInputStream;

@Service
public class FileManagerServiceImpl extends ServiceImpl<FileManagerMapper,FileManager> implements FileManagerService {

    @Autowired
    private FileManagerMapper fileManagerMapper;

    public boolean deleteFile(long id, String srcPath) {
        /*boolean flag = true;

        try {
            FileUtils.deleteFile(srcPath);
            this.getDao().delete(Long.valueOf(id));
        } catch (Exception var6) {
            flag = false;
        }*/

        return true;
    }

    public FileInputStream getFileInputStream(long id, HttpServletRequest request) {
        /*FileManager fileManager = (FileManager)this.getDao().getById(Long.valueOf(id));
        String filePath = request.getSession().getServletContext().getRealPath("");
        filePath = filePath + fileManager.getFilePath();
        File file = new File(filePath);
        FileInputStream fis = null;

        try {
            fis = new FileInputStream(file);
        } catch (FileNotFoundException var9) {
            var9.printStackTrace();
        }*/

        return null;
    }
}
